#include "secure_transfer.h"
#include <stdio.h>
#include <stdlib.h>
# include <termio.h>
# include <unistd.h>
# include <fcntl.h>
# include <getopt.h>
# include <time.h>
# include <errno.h>

int main()
{
	data_transfer *ptransfer = new secure_transfer();
	unsigned char str[9] = "12345678";
	int ret = 0;

	ret = ptransfer->send(str,8,true);
	if(ret == -1)
		printf("Sending error\n");

	printf("sleep(2) begin\n");
	sleep(2);
	printf("sleep(2) end\n");

	ret = ptransfer->recv(str,8,true);
	if(ret == -1)
		printf("Receiving error\n");
	printf("%s\n",str);

	delete ptransfer;
	ptransfer = NULL;
	return 0;
}
